package com.wyc.apiboss.feign;

import com.wyc.internalCommon.request.CarDTO;
import com.wyc.internalCommon.request.DriverCarBindingRelationshipDTO;
import com.wyc.internalCommon.request.DriverUserDTO;
import com.wyc.internalCommon.result.ApiResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("service-driver-user")
public interface DriverUserFeignClient {

    /**
     * 新增或修改司机信息
     * @param driverUser
     * @return
     */
    @PostMapping("/user")
    ApiResult insert(@RequestBody DriverUserDTO driverUser);

    /**
     * 插入或修改车辆信息
     * @param car
     * @return
     */
    @PostMapping("/car")
    ApiResult insertOrUpdateCar(@RequestBody CarDTO car);

    /**
     * 司机绑定车辆
     * @param driverCarBindingRelationship
     * @return
     */
    @PostMapping("/driver-car-bind")
    ApiResult bind(@RequestBody DriverCarBindingRelationshipDTO driverCarBindingRelationship);

    /**
     * 司机解绑车辆
     * @param driverCarBindingRelationship
     * @return
     */
    @PostMapping("/driver-car-unbind")
    ApiResult unBind(@RequestBody DriverCarBindingRelationshipDTO driverCarBindingRelationship);

}
